import instance from './client'

// 登录接口
export var LOGIN = (data)=> {
    return instance.post("/api/v1/login",data)
}

export var USER_LIST = (params)=> {
    return instance.get("/api/v1/users",{params})
}
export var USER_PERMISSION_LIST = (id)=> {
    return instance.get(`/api/v1/users/permissions/${id}`)
}
export var USER_GROUP_LIST = (id)=> {
    return instance.get(`/api/v1/users/groups/${id}`)
}
export var GROUP_LIST = (params)=> {
    return instance.get("/api/v1/groups",{params})
}

export var USER_DETAIL = (id)=> instance.get(`/api/v1/users/${id}`)


export var DELETE_USER = (data)=> instance.delete(`/api/v1/users`,{data:data})
export var ADDUSER_GROUP = (data)=> instance.post('/api/v1/users/association',data)
